package com.hd.service.impl;

import com.hd.mapper.ReservationInstrMapper;
import com.hd.pojo.InstrInfo;
import com.hd.pojo.ReservationInstr;
import com.hd.service.ReservationInstrService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 1 on 2017/11/28.
 */
@Service("reservationInstrService")
@Transactional
public class ReservationInstrServiceImpl implements ReservationInstrService {

    @Resource
    private ReservationInstrMapper reservationInstrMapper;

    @Override
    public List<InstrInfo> searchInstrByDate(String startDate,Integer instrId) {
        return reservationInstrMapper.searchInstrByDate(startDate,instrId);
    }

    @Override
    public Integer addRI(ReservationInstr reservationInstr) {
        return reservationInstrMapper.add(reservationInstr);
    }

    @Override
    public ReservationInstr searchReserInstrNotEnter() {
        return reservationInstrMapper.searchReserInstrNotEnter();
    }

    @Override
    public void updateReservationInstr(Integer reserveInstrId) {
        reservationInstrMapper.updateReservationInstr(reserveInstrId);
    }
}
